package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface SearchDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun  addSearch(searchEntity: SearchEntity):Long

    @Query("select * from searchentity order by id desc")
    fun getSearchs():List<SearchEntity>

    @Delete
    fun deleteSearch(searchEntity: SearchEntity):Int
}